<?php 
$show_validator = true;
include TMPL_PATH.'/public/header.phtml';
?>
<script type="text/javascript">
<!--
$(function(){
	$.formValidator.initConfig({autotip:true,formid:"myform",onerror:function(msg){}});
	$("#username").formValidator({onshow:"请输入联系人",onfocus:"请输入联系人"}).inputValidator({min:2,max:20,onerror:"请输入联系人"});
//	$("#mobile").formValidator({empty:true,onshow:"手机号不填请留空",onfocus:"手机号只能由1开头11位数字"}).regexValidator({regexp:"mobile",datatype:"enum",onerror:"手机号格式错误"});
//	$("#phone").formValidator({empty:true,onshow:"电话号码不填请留空,电话号码格式：（地区号-）用户号（-分机号）如010-66668888-123",onfocus:"电话号码格式错误"}).regexValidator({regexp:"mobile",datatype:"enum",onerror:"电话号码格式错误"});
})
//-->
</script>
<div class="subnav">
    <div class="content-menu ib-a blue line-x">
        <a href='<?php echo U('cluster/cluster_list');?>'><em>站群列表</em></a><span>|</span>
        <a href='javascript:;' class="on"><em><?php echo isset($cluster) ? '添加' : '编辑';?>子站</em></a>
    </div>
</div>
<div class="pad_10">
<div class="common-form">
<form name="myform" action="__SELF__" method="post" id="myform">
<table width="100%" class="table_form contentWrap">
<tr>
<th width="80">联系人：</th> 
<td><input type="text" name="username" value="<?php echo isset($cluster) ? $cluster['username'] : null;?>" class="input-text" id="username"/></td>
</tr>
<tr>
<th>公司名称：</th>
<td><input type="text" name="company_name" value="<?php echo isset($cluster) ? $cluster['company_name'] : null;?>" class="input-text" id="company_name" size="50"/></td>
</tr>
<tr>
<th>公司地址：</th>
<td><input type="text" name="company_address" value="<?php echo isset($cluster) ? $cluster['company_address'] : null;?>" class="input-text" id="company_address" size="50"/></td>
</tr>
<tr>
<tr>
<th>联系人手机：</th>
<td><input type="text" name="mobile" value="<?php echo isset($cluster) ? $cluster['mobile'] : null;?>" class="input-text" id="mobile"/></td>
</tr>
<tr>
<th>联系人电话：</th>
<td><input type="text" name="phone" value="<?php echo isset($cluster) ? $cluster['phone'] : null;?>" class="input-text" id="phone"/></td>
</tr>
<tr>
<th>公司简介：</th>
<td><textarea name="company_description" style="width: 606px; height: 104px;"><?php echo isset($cluster) ? $cluster['company_description'] : null;?></textarea></td>
</tr>
<tr>
<th>状态：</th>
<td><input name="enabled" value="1" type="radio" <?php if(!isset($cluster) || (isset($cluster) && $cluster['enabled']==1))echo 'checked';?>/> 开启    
<input name="enabled" value="0"  type="radio" <?php if(isset($cluster) && $cluster['enabled']==0)echo 'checked';?>/> 禁用</td>
</tr>
</table>
    <div class="bk15"></div>
    <input name="dosubmit" type="submit" value="提交" class="button" id="dosubmit" />
</form>
</div>
</div>
</body>
</html>